-
Notifications
You must be signed in to change notification settings - Fork 13.9k
Fix some issues around rustc_public
#148358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for proactively looking at this
| pub mod abi; | ||
| mod alloc; | ||
| pub(crate) mod unstable; | ||
| pub mod unstable; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should make this module public. Instead, we should add an attribute to the trait declarations:
/// This is used by the public `rustc_internal::stable` function when feature `rustc_internal` is enabled.
#[cfg_attr(not(feature = "rustc_internal"), allow(unreachable_pub))]
pub trait Stable<'tcx>: PointeeSized {
// ...
}| // A thread local variable that stores a pointer to [`CompilerInterface`]. | ||
| scoped_tls::scoped_thread_local!(static TLV: Cell<*const ()>); | ||
|
|
||
| // FIXME(makai410): remove this cfg when we have a stable driver. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need this FIXME... Maybe just a comment. We could also move this function to be inside rustc_internal.
cc #148266 .
follow-up of #148341 .
This fixes the issues that can be reproduced by
x test compiler/rustc_public: